#include "SMPPCongestionState.hpp"

using namespace smpp::pdu;

CongestionState::CongestionState(const quint8 nValue):
TLV(TLVtags::TAG_CONGESTION_STATE,1),_Value(nValue){}

CongestionState::CongestionState(const CongestionState &nCongestionState):
TLV(nCongestionState),_Value(nCongestionState.getValue()){}

bool CongestionState::operator ==(
	const CongestionState &nCongestionState) const{
	return (TLV::operator == (nCongestionState) && 
	_Value == nCongestionState.getValue());
}

bool CongestionState::operator !=(
	const CongestionState &nCongestionState) const{
	return !this->operator == (nCongestionState);
}

CongestionState &CongestionState::operator = (
	const CongestionState &nCongestionState){
	if(*this == nCongestionState)
		return *this;
	TLV::operator = (nCongestionState);
	_Value = nCongestionState.getValue();
	return *this;
}

void CongestionState::setValue(const quint8 nValue){
	_Value = nValue;
}

const quint8 CongestionState::getValue() const{
	return _Value;
}
